package demo.spark.hurypoint.parser

import demo.spark.utils.SparkSql
import org.apache.spark.sql.{SQLContext, SparkSession}

object AppSqlRunner {

  // 引入循环控制.
  import scala.util.control.Breaks;

  def main(args: Array[String]): Unit = {
    // spark session for hive.
    import SparkSql.metastoreUris;
    metastoreUris = "thrift://mac14:9083"
    val sparkSession: SparkSession = SparkSql.getHiveSession("AppSqlRunner")("local[*]");

    sparkSession.sql("use icasue2");

    sparkSession.sql("select * from bury_point_20210601 limit 11")
      .show(11)

    sparkSession.close();
  }

}
